package com.ys.controller.web.finance;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.ys.controller.api.finance.ApiInterTcwFinancesEventGroupsController;
import com.ys.entity.finance.TcwFinancesEventGroups;
import com.ys.service.sys.CommonApiService;
import com.ys.vo.W;

@Controller
@RequestMapping("/web/finance/tcwFinancesEventGroups")
public class WebTcwFinancesEventGroupsController {
	

	@Autowired
	private CommonApiService<TcwFinancesEventGroups> commonApiService;
	
	/*
	 * 新增
	 */
	@GetMapping("/toAdd")
	public String toAdd(Model model, HttpServletRequest request, HttpServletResponse response,@RequestParam Map<String, Object> params){

		try {
			return commonApiService.toAdd(model, new TcwFinancesEventGroups(), ApiInterTcwFinancesEventGroupsController.MENU_ID, null, null);

		} catch (Exception e) {
			e.printStackTrace();
			return W.error(model, "数据有误，请联系客服");
		}
	}
}
